﻿using System;

namespace TextEditor
{


    public class A_LockDocument : A_Action
    {
        public override string ActionName()
        {
            return "lock";
        }

        public override int CheckState()
        {
            return (base.myOwnerDocument.Locked ? 1 : 0);
        }

        public override bool Execute()
        {
            base.myOwnerDocument.Locked = !base.myOwnerDocument.Locked;
            return true;
        }
    }
}

